package com.ax.pojo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TabTypes entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TabTypes", schema = "dbo", catalog = "uploadDown")
public class TabTypes implements java.io.Serializable {

	// Fields

	private Integer tid;
	private TabTypes tabTypes;
	private String tname;
	private String tkeyword;
	private String tdescribe;
	private Set<TabTypes> tabTypeses = new HashSet<TabTypes>(0);
	private Set<TabContents> tabContentses = new HashSet<TabContents>(0);

	// Constructors

	/** default constructor */
	public TabTypes() {
	}

	/** minimal constructor */
	public TabTypes(String tname) {
		this.tname = tname;
	}

	/** full constructor */
	public TabTypes(TabTypes tabTypes, String tname, String tkeyword,
			String tdescribe, Set<TabTypes> tabTypeses,
			Set<TabContents> tabContentses) {
		this.tabTypes = tabTypes;
		this.tname = tname;
		this.tkeyword = tkeyword;
		this.tdescribe = tdescribe;
		this.tabTypeses = tabTypeses;
		this.tabContentses = tabContentses;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "TId", unique = true, nullable = false)
	public Integer getTid() {
		return this.tid;
	}

	public void setTid(Integer tid) {
		this.tid = tid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TParentID")
	public TabTypes getTabTypes() {
		return this.tabTypes;
	}

	public void setTabTypes(TabTypes tabTypes) {
		this.tabTypes = tabTypes;
	}

	@Column(name = "TName", nullable = false, length = 50)
	public String getTname() {
		return this.tname;
	}

	public void setTname(String tname) {
		this.tname = tname;
	}

	@Column(name = "TKeyword", length = 100)
	public String getTkeyword() {
		return this.tkeyword;
	}

	public void setTkeyword(String tkeyword) {
		this.tkeyword = tkeyword;
	}

	@Column(name = "TDescribe", length = 50)
	public String getTdescribe() {
		return this.tdescribe;
	}

	public void setTdescribe(String tdescribe) {
		this.tdescribe = tdescribe;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "tabTypes")
	public Set<TabTypes> getTabTypeses() {
		return this.tabTypeses;
	}

	public void setTabTypeses(Set<TabTypes> tabTypeses) {
		this.tabTypeses = tabTypeses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tabTypes")
	public Set<TabContents> getTabContentses() {
		return this.tabContentses;
	}

	public void setTabContentses(Set<TabContents> tabContentses) {
		this.tabContentses = tabContentses;
	}

}